<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../css/aui.css">
    <link rel="stylesheet" type="text/css" href="../../css/aui-slide.css">
    <link rel="stylesheet" type="text/css" href="../../css/api.css">
    <script type="text/javascript" src="../../script/api.js"></script>
</head>

<body>
    <header class="aui-bar aui-bar-nav">
        <a href="" class="aui-pull-left"><span class="aui-iconfont aui-icon-left" onclick="api.closeWin()"></span></a>
        <div class="aui-title">修改绑定手机号</div>
    </header>

    <div class="aui-list aui-media-list">
        <div class="aui-list-header aui-font-size-20" id="binded_phone">以绑定手机：173****3804</div>
    </div>

    <div class="aui-searchbar aui-margin-t-15" id="search">
        <div class="aui-searchbar-input aui-border-radius" tapmode onclick="doSearch()">
            <form action="javascript:search();">
                <input type="text" placeholder="请输入验证码" id="search_input">
            </form>
        </div>
    </div>
    <p>
        <div class="aui-btn aui-btn-block aui-margin-t-15" onclick="openBPhone()">下一步</div>
    </p>
</body>
<script type="text/javascript">
    apiready = function() {
        window.openBPhone = function() {
            api.openFrame({
                name: 'UpdateBindPhone_2',
                url: './UpdateBindPhone_2.html',
                rect: {
                    x: 0,
                    y: 0,
                    w: 'auto',
                    h: 'auto'
                }
            });

        }
        var binded_phone = $api.byId('binded_phone');
        var search_input = $api.byId('search_input');
        search_inputValue = search_input.value;
        var token='';
        var body={
          token:$api.getStorage('token'),
          search_input:search_inputValue
        }
        api.ajax({
            url: 'http://www.mk517.com/webApi/updateBindPhone_1.php',
            method: 'post',
            dataType:'json',
            "headers":{"Content-Type":"application/json"},
            data: {
                body:body
            }
        }, function(ret, err) {
            
        });

    }
</script>

</html>
